<!--  -->
<template>
    <div v-if="Object.keys(goods).length !==0" class="base-info" >
        <p class="title"> {{goods.title}}</p>
        <div class="price">
            <span class="current-price">￥{{goods.lowNowPrice}}</span>
            <span class="hight-price">{{goods.oldPrice}}</span>
            <span class="tag">{{goods.discountDesc}}</span>
        </div>
        <div class="info">
            <span v-for="(item,index) in goods.columns" :key="index">{{item}}</span>
        </div>
        <div class="other-info">
            <span v-for="(item,index) in goods.services" :key="index">
                <img :src="item.icon" alt="" class="servieces-img">
                {{item.name}}
            </span>
        </div>
    </div>

</template>

<script>
export default {
  name: 'BaseInfo',
  props:{
    goods:{
        type:Object,
        default(){
            return {}
        }
    }
  },
  data () {
    return {
    };
  },

  components: {},

  computed: {},

  mounted(){},

  methods: {}
}

</script>
<style lang='scss' scoped>
.base-info{
 padding:10px;
}
.price{
   padding:10px 0;
    .current-price{
        color:var(--color-tint);
        font-size: 18px;
    }
    .hight-price{
    text-decoration: line-through;
    padding:0 10px;
    display: inline-block;
    }
    .tag{
        padding:5px 10px;
        background: var(--color-tint);
        color:#fff;
        border-radius: 20px;
    }
}
.info,.other-info{
    width:100%;
    display: flex;
    justify-content: space-between;
    padding:5px 0;
    border-bottom:1px solid #ddd;
}
.other-info{
    padding:15px 0;
    border-bottom:1px dashed #ddd;
    display: flex;
    flex-wrap:wrap;
    align-items: center;
}
.servieces-img{
    width:1em;
    height:1em;
}
</style>